﻿using MediatR;
using Traceability.Commont.Domains.BatchManagementFiles;
using Traceability.Commont.DTOs.CommontFiles;
using Traceability.Commont.Infrastructures.Interfaces;
namespace U.Enterprise.Api.Applications.ReturnWeighing
{
    public class ReturnWeighingHtmlHandlercs : IRequestHandler<ReturnWeighingHtmlCommondcs, Resqults>
    {

        private readonly IBateRepository<Byproduct> _Byproduct;

        public ReturnWeighingHtmlHandlercs(IBateRepository<Byproduct> byproduct)
        {
            _Byproduct = byproduct;
        }

        public async Task<Resqults> Handle(ReturnWeighingHtmlCommondcs request, CancellationToken cancellationToken)
        {
            

            var list=new Resqults() { Code=0};

            
            list.Date=_Byproduct.GetAll().ToList();



            return list;



        }
    }
}
